<template>
  <div
    class="jy-style-height copyright-box"
    :style="{
      background: ` url(${publicUrls + 'free/style11/publicStyle11Bg.png' + '?imageView2/3/format/webp'})`,
    }"
  >
    <div class="content-box">
      <div class="copyright-heard">
        <div class="backHome">
          <div class="line"></div>
          <p @click="blankHome">返回</p>
        </div>
        <div class="heard-title">策展团队</div>
      </div>
      <div class="copyright-content" v-if="commonStore.teamInfo.text">
        <scrollBox
          color="rgba(50, 43, 37, 1)"
          v-if="Scrollheights"
          :remarks="commonStore.teamInfo.text"
          :byid="234161"
          :height="getScrollHeight"
        >
          <template #solidBorder>
            <div class="solidBorder-child"></div>
          </template>
        </scrollBox>
      </div>
      <div class="is-null" v-if="!commonStore.teamInfo.text">
        <img :src="publicUrls + 'free/style2/exhibitsImg.png'" alt="" />
        <span>暂无内容</span>
      </div>
      <div class="content-door">
        <i class="iconfonts">&#xe6dd;</i>
        <span>永不落幕的展览与展示平台</span>
      </div>
    </div>
    <MenuNavigation />
  </div>
</template>

<script lang="ts">
export default defineComponent({
  name: 'style11',
});
</script>

<script setup lang="ts">
// @ts-nocheck
import { publicUrls } from '@/utils/minxin';
import { commonDataStore, useProjectStore } from '@/store';
import { computed, defineComponent, nextTick, ref } from 'vue';
import { useRouter, useRoute } from 'vue-router';
import ScrollBox from '../scrollBox.vue';
import { teamContentInfo } from '@/api/templates/templates';
import MenuNavigation from '@/freeComponents/menuNavigation/index.vue';

const commonStore = commonDataStore();
const store = useProjectStore();
const router = useRouter();
const route = useRoute();
const Scrollheights = ref();

commonStore.getTeamContentDescription();
const htmlText = ref();

let viewportHeight = window.innerHeight;
Scrollheights.value = (viewportHeight / 900) * 0.4388;

const getScrollHeight = computed(() => {
  let rootNode = document.documentElement;

  // 获取计算后的样式
  let computedStyle = window.getComputedStyle(rootNode);

  // 读取字体大小（注意这里返回的可能是一个包含单位的字符串，如"16px"）
  let fontSize = computedStyle.fontSize;

  // 如果你需要一个数字值（不带单位）进行计算，你可能需要解析这个字符串
  // 例如，使用正则表达式或split()方法去除单位，并将结果转换为数字
  let fontSizeNumber = parseFloat(fontSize.replace(/[^0-9.-]/g, ''));
  let heights = (fontSizeNumber / 144) * 560;
  return heights;
});

const blankHome = () => {
  store.menuId = null;
  router.push({ name: route.meta.loopType ? 'exhibitionHome' : 'templateedit' });
};
</script>
 
<style scoped lang="less">
.copyright-box {
  width: 100%;
  padding-bottom: 0px;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}
// 头部
.content-box {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 40px 0;
  padding-bottom: 0px;
  position: relative;
  .copyright-heard {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0 76px;
    margin-bottom: 24px;

    .backHome {
      height: 30px;
      margin-left: 0 !important;
      display: flex;
      align-items: center;
      position: absolute;
      left: 0;
      top: 50%;
      transform: translateY(-50%);
      .line {
        width: 140px;
        height: 1px;
        background: #ffecc3;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: end;
        &::after {
          content: '';
          display: block;
          width: 5px;
          height: 5px;
          border-radius: 50%;
          background: #ffecc3;
        }
      }
      ::v-deep p {
        cursor: pointer;
        color: #ffecc3;
        font-family: 'SourceHanSerifCN-Bold';
        font-size: 18px;
        line-height: 160%;
        margin-left: 2px;
      }
    }
    .heard-title {
      color: #ffecc3;
      font-family: 'SourceHanSerifCN-Bold';
      font-size: 36px;
      line-height: 56px;
      display: flex;
      align-items: center;
    }
  }
}

// 内容
.copyright-content {
  width: calc(100% - 120px);
  height: 100%;
  padding: 0 75px;
  background: url(https://static.jiyi.show/free/style11/publicStyle11Bg2.png?imageView2/format/webp) no-repeat
    center/100% 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  overflow: hidden;
  // 空状态
  .is-null {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 50%;
    left: 0;
    transform: translate(0, -50%);
    img {
      width: 190px;
      height: 190px;
    }
    span {
      font-family: PingFangSC, PingFang SC;
      font-size: 16px !important;
      color: #ffecc3;
      line-height: 22px;
      // opacity: 26%;
    }
  }

  // 滚动条位置
  ::v-deep .solid-box-parent {
    right: -50px;
  }
  // 滚动条轨道
  .solidBorder-child {
    width: 2px;
    height: 100%;
    background: rgba(139, 127, 104, 0.4);
    border-radius: 1px;
  }
  // 滚动条按钮
  ::v-deep .templatestyle1-scroll-box-tumb {
    display: flex;
    justify-content: center;
    top: -4px;
    .scrollBar {
      width: 4px;
      height: 100%;
      background: rgba(139, 127, 104, 1);
      border-radius: 4px;
      box-shadow: none;
    }
  }
  // 文本样式
  ::v-deep .unit-exbi-remarks-info-remarks {
    p {
      color: #333;
      font-size: 16px;
      text-align: justify;
      font-weight: normal;
    }
  }
}

// 底部logo
.content-door {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 8px;
  opacity: 0.5;
  .iconfonts {
    font-size: 26px;
    color: #c6b599;
    margin-bottom: 4px;
    line-height: 32px;
  }
  span {
    font-family: PingFang SC;
    font-size: 16px;
    line-height: 32px;
    color: #c6b599;
    margin-left: 20px;
    padding-bottom: 7px;
  }
}
</style>